<?php
    require_once "conn.php";
    if(isset($_POST['save'])){
        $name = $_POST['name'];
        $email = $_POST['email'];
        $mobile = $_POST['mobile'];
        // echo $mobile;
        $sql = "INSERT INTO users (name,email,mobile) VALUES ('$name','$email','$mobile')";
        // mysqli_query($link,$sql);
        //返回首页
        if (mysqli_query($link, $sql)) {
                header("location: index.php");
                exit();
            } else {
                echo "Error: " . $sql . "." .mysqli_error($link);
        }
        mysqli_close($link);
    }
?>
